package com.fintecher.controller;

import com.fintecher.pojo.Dictionary;
import com.fintecher.service.IDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Created by Administrator on 2017/2/8.
 */
@Controller
@RequestMapping("/dictionary")
public class DictionaryController {
    @Resource
    private IDictionaryService dictionaryService;

    public IDictionaryService getDictionaryService() {

        return dictionaryService;
    }

    @Autowired
    public void setDictionaryService(IDictionaryService dictionaryService) {
        this.dictionaryService = dictionaryService;
    }


    @RequestMapping("getPositiveType")
    public String getPositiveType(HttpServletRequest request, HttpServletResponse response, Model model) {
        List<Dictionary> list = dictionaryService.selectPositiveType(5);
        request.setAttribute("dictList", list);
        return "buy_market";
    }

    @RequestMapping("to")
    public String to(HttpServletRequest request, HttpServletResponse response, Model model) {

        return "bill_market";
    }
}
